package site.anxuan.seckill.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import javax.validation.constraints.Min;

/**
 * 商品库存实体类
 *
 * @author 黯玄
 * @since v1.0
 */
@Data
@ToString
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class ItemStock {

    /** 主键 */
    private Integer id;

    /** 商品实体类主键 */
    private Integer itemId;

    /** 商品库存量 */
    @Min(value = 0, message = "库存数量不能少于0")
    private Integer stock;

}
